<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0508</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2023-12-26</periodOfReport>

    <issuer>
        <issuerCik>0001620533</issuerCik>
        <issuerName>Shake Shack Inc.</issuerName>
        <issuerTradingSymbol>SHAK</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001396917</rptOwnerCik>
            <rptOwnerName>Flug Jeffrey</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>C/O SHAKE SHACK INC.</rptOwnerStreet1>
            <rptOwnerStreet2>225 VARICK STREET, SUITE 301</rptOwnerStreet2>
            <rptOwnerCity>NEW YORK</rptOwnerCity>
            <rptOwnerState>NY</rptOwnerState>
            <rptOwnerZipCode>10014</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>1</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>1</isTenPercentOwner>
            <isOther>0</isOther>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>1</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Class A Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2023-12-26</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
                <footnoteId id="F1"/>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>771</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>75.0677</value>
                    <footnoteId id="F2"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>5740</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">The transaction reported on this Form 4 was effected automatically pursuant to a Rule 10b5-1 trading plan entered into by the Reporting Person on May 18, 2023.</footnote>
        <footnote id="F2">The price reported above reflects the average weighted sales price. The transaction was executed in multiple trades at prices ranging from $75.02 to $75.14. Mr. Flug hereby undertakes to provide upon request to the SEC Staff, Shake Shack Inc. (the &quot;Issuer&quot;) or a security holder of the Issuer full information of the number of shares and prices at which the transaction was effected.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Ronald Palmese, Jr. Esq., Attorney-in-Fact for Jeffrey Flug</signatureName>
        <signatureDate>2023-12-28</signatureDate>
    </ownerSignature>
</ownershipDocument>
